import request from '/@/utils/request';
import {versions} from '/@/api/versions'

export function getPostList(query: object) {
    return request({
        url: `${versions}/system/post/list`,
        method: 'get',
        params: query
    })
}

export function addPost(data: object) {
    return request({
        url: `${versions}/system/post/add`,
        method: 'post',
        data: data
    })
}


export function editPost(data: object) {
    return request({
        url: `${versions}/system/post/edit`,
        method: 'put',
        data: data
    })
}


export function deletePost(ids: number[]) {
    return request({
        url: `${versions}/system/post/delete`,
        method: 'delete',
        data: {ids}
    })
}
